package com.cy.store.domain;

import java.util.Objects;

/**
 * @author Administrator
 * @version 1.0
 * @description: TODO
 * @date 2025/2/27 09:24
 */
public class Product extends BaseEntity{
/**
 * 商品信息类
 * 该类用于描述商品的基本属性，包括商品的标识、分类、类型、标题、卖点、价格、数量、图片、状态和优先级
 */
private Integer id; // 商品的唯一标识符
private String categoryId; // 商品所属的分类标识符
private String itemType; // 商品的类型标识符
private String title; // 商品的标题
private String sellPoint; // 商品的卖点描述
private Long price; // 商品的价格，以某种货币单位表示
private Integer num; // 商品的库存数量
private String image; // 商品的图片链接或标识符
private Integer status; // 商品的状态标识符，表示商品是否上架、下架或删除等
private Integer priority; // 商品的优先级，用于排序或筛选


    @Override
    public String toString() {
        return "Product{" +
                "id=" + id +
                ", categoryId='" + categoryId + '\'' +
                ", itemType='" + itemType + '\'' +
                ", title='" + title + '\'' +
                ", sellPoint='" + sellPoint + '\'' +
                ", price=" + price +
                ", num=" + num +
                ", image='" + image + '\'' +
                ", status=" + status +
                ", priority=" + priority +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof Product product)) return false;
        if (!super.equals(o)) return false;
        return Objects.equals(getId(), product.getId()) && Objects.equals(getCategoryId(), product.getCategoryId()) && Objects.equals(getItemType(), product.getItemType()) && Objects.equals(getTitle(), product.getTitle()) && Objects.equals(getSellPoint(), product.getSellPoint()) && Objects.equals(getPrice(), product.getPrice()) && Objects.equals(getNum(), product.getNum()) && Objects.equals(getImage(), product.getImage()) && Objects.equals(getStatus(), product.getStatus()) && Objects.equals(getPriority(), product.getPriority());
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), getId(), getCategoryId(), getItemType(), getTitle(), getSellPoint(), getPrice(), getNum(), getImage(), getStatus(), getPriority());
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId;
    }

    public String getItemType() {
        return itemType;
    }

    public void setItemType(String itemType) {
        this.itemType = itemType;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSellPoint() {
        return sellPoint;
    }

    public void setSellPoint(String sellPoint) {
        this.sellPoint = sellPoint;
    }

    public Long getPrice() {
        return price;
    }

    public void setPrice(Long price) {
        this.price = price;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }
}
